
<h2 align="center">{[$result.name]}</h2>

<div class="view_1">
<table>
	<tr>
		<td width="60%" valign="top">
		<fieldset style="border: 0px;">
		<h3>买方：{[$result.customer_x->fullname]}</h3>
		地址：{[$result.customer_x->address]}<br />
		电话：{[$result.customer_x->tel]} 传真：{[$result.customer_x->tel]}<br /></fieldset></td>
		<td width="10%"></td>
		<td width="30%">
		<fieldset>
		<table>
			<tr>
				<td align="right">合同编号</td>
				<td><img src="finance.php?do=Contract.ajax_barcode&s={[$result.id]}"></td>
			</tr>
		</table>
		</fieldset>
		</td>
	</tr>
</table>
</div>

<div class="view_1">
<table>
	<tr>
		<td id="edit_supplier" width="60%" valign="top">
		<fieldset style="height: 60px;">
		<h3>卖方：{[$result.supplier_x->fullname]}</h3>
		地址：{[$result.supplier_x->address]}<br />
		电话：{[$result.supplier_x->tel]} 传真：{[$result.supplier_x->fax]}<br />
		</fieldset>
		</td>
		<td width="1%"></td>
		<td width="39%" valign="top">
		<fieldset style="height: 60px">合同日期：{[$result.t1|date_format:'%Y-%m-%d']}<br />		
		签订地点：{[$result.city]}<br />
		交货日期：{[$result.t2|date_format:'%Y-%m-%d']}之前<br />
		合同金额：{[$result.currency]} {[$result.amount|money]}<br />
		</fieldset>
		</td>
	</tr>
</table>
</div>

<div class="view_3">
<table>
	<tr align="center">
		<td>序号</td>
		<td>名称及规格</td>
		<td>单位</td>		
		<td>单价</td>
		<td>数量</td>
		<td>金额</td>

		<td>备注</td>	
	</tr>
	{[foreach name=outer key=key item=item from=$result.item]} 
	{[assign var="no" value="`$key+$pager->from+1`"]} 
	{[assign var="amount" value="`$item.price*$item.quantity`"]} 
	{[assign var="t1" value="`$t1+$amount`"]}
	<tr align="center" onMouseOver="this.style.backgroundColor='#D2E4FC'" onMouseOut="this.style.backgroundColor=''">
		<td>{[$no]}</td>
		<td>{[$item.name]} {[$item.mold_t]}</td>

		<td>{[$item.unit]}</td>
		<td>{[$item.price|money]}</td>
		<td>{[$item.quantity|string_float]}</td>
		
		<td>{[$amount|money]}</td>

		<td>{[$item.content|truncate:30]}</td>
	</tr>
	{[/foreach]}
	{[foreach name=outer key=key item=item from=$blank]}
	<tr align="center">
		<td>&nbsp;</td>
		<td></td>
		
		<td></td>
		<td></td>
		<td></td>
		
		<td></td>
		<td></td>
	</tr>
	{[/foreach]}	
	<tr>
		<td colspan="5" align="center">合计（大写）{[$result.currency_t]} {[$t1|rmb]}</td>
		<td align="center">{[$t1|money]}</td>
		<td></td>
	</tr>
	<tr>
		<td colspan="7" valign="top" style="height: 60px; font-size:12px;">备注：<br/><br/>
		{[$result.content|nl2br]}
		</td>
	</tr>
	<tr>
		<td colspan="7" style="font-size:12px;">条款：
		<ol>
			<li>本合同为买卖双方已签订的《买卖合同》的合法组成部分，一式二份，买卖双方各执一份，自双方代表签字盖章确认之日起生效；</li>
			<li>本合同明确载明的特殊事项除外，未明确事项均按照双方已签订的《买卖合同》约定履行；</li>
			<li>本合同的货物必须按期交付，特殊情况应书面通知并取得双方同意；</li>
			<li>本合同的买方有权取消和修改订单，并拒收延期的货物且不承担任何责任；</li>
			<li>与本交易有关的任何争议，均应提交给深圳仲裁委员会裁解；</li>			
		</ol>
		</td>
	</tr>
</table>
</div>

<br/>
<div class="view_1">
<table>
	<tr height="100px">
		<td width="45%" valign="top">Prepared by:<br />
		For and on behalf of
		<h3>{[$result.customer_x->fullname]}</h3>
		</td>
		<td width="10%"></td>
		<td width="45%" valign="top">Confirmed & Accepted by:<br />
		For and on behalf of
		<h3>{[$result.supplier_x->fullname]}</h3>
		</td>
	</tr>
	<tr>
		<td align="right">年　　　月　　　日　　　
		<hr />
		Authorized Signature & Company Chop</td>
		<td></td>
		<td align="right">年　　　月　　　日　　　
		<hr />
		Authorized Signature & Company Chop</td>
	</tr>
</table>
</div>
